Trình soạn thảo văn bản đơn giản Trong C# mới

1 using System;
2 using
System.Collections.Generic;
3 using
System.ComponentModel;
4 using
System.Data;
5 using
System.Drawing;
6 using
System.Linq;
7 using
System.Text;
8 using
System.Windows.Forms;
9
10 namespace
Best_Notepad
11 {
12     
public partial class Login : Form
13     {
14         
public Login()
15         {
16             InitializeComponent();
17         }
18
19         
private void Login_Load(object sender, EventArgs e)
20         {
21
22         }
23
24         
private void textBox2_TextChanged(object sender, EventArgs e)
25         {
26
27         }
28
29         
private void label2_Click(object sender, EventArgs e)
30         {
31
32         }
33
34         
private void textBox1_TextChanged(object sender, EventArgs e)
35         {
36
37         }
38
39         
private void label1_Click(object sender, EventArgs e)
40         {
41
42         }
43
44         
private void button2_Click(object sender, EventArgs e)
45         {
46             Application.Exit();
47         }
48
49         
private void button1_Click(object sender, EventArgs e)
50         {
51             
if ((usernametextBox.Text == "hassan") && (passwordtextBox.Text == "hassan"))
52             {
53                 
this.Close();
54                 notepad1 obj =
new notepad1();
55                 obj.Show();
56
57             }
58             
else
59             {
60                 MessageBox.Show(
"Please Enter Correct Username and Password", "Error !", MessageBoxButtons.OK, MessageBoxIcon.Error);
61             
62             }
63         }
64
65         
private void Login_KeyPress(object sender, KeyPressEventArgs e)
66         {
67            
68         }
69
70         
private void button1_KeyPress(object sender, KeyPressEventArgs e)
71         {
72             
this.Close();
73             notepad1 obj =
new notepad1();
74             obj.Show();
75         }
76     }
77 }


Gõ tìm kiếm nhanh...